<script type="text/javascript">
    $(document).ready(function () {
        $('#idcliente').change(function () {
            $('#idpet').load('src/view/carregandoPETs.php?idcliente=' + $('#idcliente').val());

        });
    });
</script>

<h1 class='text-info'> Venda - Inserir</h1>

<form role="form" action="<?= $link_form ?>"  method="post" class="form-horizontal">
    <input type="hidden" name="idvenda" value="<?= $v->getIdvenda(); ?>">
    <div class="form-group">
        <label class="col-xs-1 col-sm-1 col-md-1 col-lg-1" for="idcliente">Cliente:</label>
        <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 " >
            <!--<input class="form-control" type="text" id="nome" name="nome"  placeholder="Informe o nome">-->
            <select class="form-control" name="idcliente" id="idcliente">
                <option value="0">Selecione um Cliente</option>
                <?php foreach ($listaCliente as $ele) { ?>
                    <option value="<?= $ele['idcliente'] ?>"><?= $ele['nome'] ?></option>
                <?php } ?>
            </select>
        </div>
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1 ">
            <!--<span class="glyphicon glyphicon-remove"></span>-->
        </div>
    </div>

    <div class="form-group">
        <label class="col-xs-1 col-sm-1 col-md-1 col-lg-1" for="idpet">PET:</label>
        <div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 " >
            <!--<input class="form-control" type="text" id="nome" name="nome"  placeholder="Informe o nome">-->
            <select class="form-control" name="idpet" id="idpet">
                 <option value="0">Selecione um Cliente</option>;
            </select>
        </div>
        <div class="col-xs-1 col-sm-1 col-md-1 col-lg-1 ">
            <!--<span class="glyphicon glyphicon-remove"></span>-->
        </div>
    </div>

    <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-ok-circle"></span> Salvar</button>
    <a href="?s=cvenda" class="btn btn-danger"><span class="glyphicon glyphicon-remove-circle"></span> Cancelar</a>
</form>